#include "taskfactory.hxx"
#include "task.hxx"
#include "inusetask.hxx"

Task* TaskFactory::CreateTask(int Type, const User* user, int id, const std::string& info, Task::TaskStatus status, FileLog* filelog)
{
	Task* task = NULL;

	switch (Type)
	{
	case 0:
		task = new Task(user, id, info, status, filelog);
		break;
	case 1:
		task = new InuseTask(user, id, info, status, filelog);
		break;
	default:
		break;
	}
	
	return task;
}